<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: Hashtable manipulation module</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__gdsl__hash.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Hashtable manipulation module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct hash_table *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL hashtable type.  <a href="#gae145ec3ea3d118dcc593ab7902162cd2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef const char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga9198c4e32d387180450fa57d7e29515d">gdsl_key_func_t</a> )(void *VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL hashtable key function type.  <a href="#ga9198c4e32d387180450fa57d7e29515d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gab53a567436929e68661a337d7c3b20a0">gdsl_hash_func_t</a> )(const char *KEY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL hashtable hash function type.  <a href="#gab53a567436929e68661a337d7c3b20a0"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gafb96675c3097a359e962bca36a11a528">gdsl_hash</a> (const char *KEY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes a hash value from a NULL terminated character string.  <a href="#gafb96675c3097a359e962bca36a11a528"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c">gdsl_hash_alloc</a> (const char *NAME, <a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a> ALLOC_F, <a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a> FREE_F, <a class="el" href="group__gdsl__hash.html#ga9198c4e32d387180450fa57d7e29515d">gdsl_key_func_t</a> KEY_F, <a class="el" href="group__gdsl__hash.html#gab53a567436929e68661a337d7c3b20a0">gdsl_hash_func_t</a> HASH_F, <a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> INITIAL_ENTRIES_NB)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new hashtable.  <a href="#gae19c5647d31f3d8f88b988e89609049c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga3723a6cfb3338b7e312d3e2f161f0692">gdsl_hash_free</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a hashtable.  <a href="#ga3723a6cfb3338b7e312d3e2f161f0692"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gac047b5a4899747159dbaf44b39b7daeb">gdsl_hash_flush</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush a hashtable.  <a href="#gac047b5a4899747159dbaf44b39b7daeb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga199e08c06af60e688d95244a023f406d">gdsl_hash_get_name</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of a hashtable.  <a href="#ga199e08c06af60e688d95244a023f406d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0">gdsl_hash_get_entries_number</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of entries of a hashtable.  <a href="#gad87fd81a7853bdcfe2cc7fdd142556f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga5d9b8da0f4ad5e60b7fdb38156ce48f3">gdsl_hash_get_lists_max_size</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the max number of elements allowed in each entry of a hashtable.  <a href="#ga5d9b8da0f4ad5e60b7fdb38156ce48f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682">gdsl_hash_get_longest_list_size</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of elements of the longest list entry of a hashtable.  <a href="#gad89e4fe4756aa34a0f47948819e53682"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d">gdsl_hash_get_size</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of a hashtable.  <a href="#ga9f9bd328f3237d333a7d7bab5285aa2d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga6c858e792ee64ce14bfeb0e7c03d3e42">gdsl_hash_get_fill_factor</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the fill factor of a hashtable.  <a href="#ga6c858e792ee64ce14bfeb0e7c03d3e42"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gac46d87b7312a26b985709a904a2f452e">gdsl_hash_set_name</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, const char *NEW_NAME)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the name of a hashtable.  <a href="#gac46d87b7312a26b985709a904a2f452e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b">gdsl_hash_insert</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, void *VALUE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an element into a hashtable (PUSH).  <a href="#ga98ae1fcdb6908b699056e131357d837b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga2e7d31f45b959fe14badc3b620a8de5e">gdsl_hash_remove</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, const char *KEY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove an element from a hashtable (POP).  <a href="#ga2e7d31f45b959fe14badc3b620a8de5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga94dfde405aae321e2c3d02d3c260bfcb">gdsl_hash_delete</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, const char *KEY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete an element from a hashtable.  <a href="#ga94dfde405aae321e2c3d02d3c260bfcb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234">gdsl_hash_modify</a> (<a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, <a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> NEW_ENTRIES_NB, <a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> NEW_LISTS_MAX_SIZE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Increase the dimensions of a hashtable.  <a href="#ga56acbd8af54ef98000d1749afbb28234"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gab8713e392d660458f514a8489c25c7c0">gdsl_hash_search</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, const char *KEY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for a particular element into a hashtable (GET).  <a href="#gab8713e392d660458f514a8489c25c7c0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#gafde50a811a8f52eed47573385ddf2a20">gdsl_hash_map</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, <a class="el" href="group__gdsl__types.html#ga2500bfaaec5df890e72b43f448f13ee8">gdsl_map_func_t</a> MAP_F, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a hashtable.  <a href="#gafde50a811a8f52eed47573385ddf2a20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga00a73b21261010787c00d33d086ad7b2">gdsl_hash_write</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write all the elements of a hashtable to a file.  <a href="#ga00a73b21261010787c00d33d086ad7b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga9b7fa22eac1c348b8b21c0136f44dcc2">gdsl_hash_write_xml</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the content of a hashtable to a file into XML.  <a href="#ga9b7fa22eac1c348b8b21c0136f44dcc2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__hash.html#ga22b2515584dca1ab91f391602f4f4eeb">gdsl_hash_dump</a> (const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> H, <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump the internal structure of a hashtable to a file.  <a href="#ga22b2515584dca1ab91f391602f4f4eeb"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gae145ec3ea3d118dcc593ab7902162cd2"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_t" ref="gae145ec3ea3d118dcc593ab7902162cd2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct hash_table* <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL hashtable type. </p>
<p>This type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. </p>

<p>Definition at line <a class="el" href="gdsl__hash_8h_source.html#l00054">54</a> of file <a class="el" href="gdsl__hash_8h_source.html">gdsl_hash.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga9198c4e32d387180450fa57d7e29515d"></a><!-- doxytag: member="gdsl_hash.h::gdsl_key_func_t" ref="ga9198c4e32d387180450fa57d7e29515d" args=")(void *VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef const char*(* <a class="el" href="group__gdsl__hash.html#ga9198c4e32d387180450fa57d7e29515d">gdsl_key_func_t</a>)(void *VALUE)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL hashtable key function type. </p>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>Returned value must be != "" &amp;&amp; != NULL. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">VALUE</td><td>The value used to get the key from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The key associated to the VALUE. </dd></dl>

<p>Definition at line <a class="el" href="gdsl__hash_8h_source.html#l00062">62</a> of file <a class="el" href="gdsl__hash_8h_source.html">gdsl_hash.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab53a567436929e68661a337d7c3b20a0"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_func_t" ref="gab53a567436929e68661a337d7c3b20a0" args=")(const char *KEY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>(* <a class="el" href="group__gdsl__hash.html#gab53a567436929e68661a337d7c3b20a0">gdsl_hash_func_t</a>)(const char *KEY)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL hashtable hash function type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">KEY</td><td>the key used to compute the hash code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The hashed value computed from KEY. </dd></dl>

<p>Definition at line <a class="el" href="gdsl__hash_8h_source.html#l00070">70</a> of file <a class="el" href="gdsl__hash_8h_source.html">gdsl_hash.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafb96675c3097a359e962bca36a11a528"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash" ref="gafb96675c3097a359e962bca36a11a528" args="(const char *KEY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__hash.html#gafb96675c3097a359e962bca36a11a528">gdsl_hash</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>KEY</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes a hash value from a NULL terminated character string. </p>
<p>This function computes a hash value from the NULL terminated KEY string.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O ( |key| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>KEY must be NULL-terminated. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">KEY</td><td>The NULL terminated string to compute the key from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the hash code computed from KEY. </dd></dl>

</div>
</div>
<a class="anchor" id="gae19c5647d31f3d8f88b988e89609049c"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_alloc" ref="gae19c5647d31f3d8f88b988e89609049c" args="(const char *NAME, gdsl_alloc_func_t ALLOC_F, gdsl_free_func_t FREE_F, gdsl_key_func_t KEY_F, gdsl_hash_func_t HASH_F, ushort INITIAL_ENTRIES_NB)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> <a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c">gdsl_hash_alloc</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NAME</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga32a9b4e8b9665183c2741d28a5ced64f">gdsl_alloc_func_t</a>&#160;</td>
          <td class="paramname"><em>ALLOC_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga2c6b3f96b291b5b39d2799f93e350053">gdsl_free_func_t</a>&#160;</td>
          <td class="paramname"><em>FREE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#ga9198c4e32d387180450fa57d7e29515d">gdsl_key_func_t</a>&#160;</td>
          <td class="paramname"><em>KEY_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gab53a567436929e68661a337d7c3b20a0">gdsl_hash_func_t</a>&#160;</td>
          <td class="paramname"><em>HASH_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td>
          <td class="paramname"><em>INITIAL_ENTRIES_NB</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new hashtable. </p>
<p>Allocate a new hashtable data structure which name is set to a copy of NAME. The new hashtable will contain initially INITIAL_ENTRIES_NB lists. This value could be (only) increased with <a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234" title="Increase the dimensions of a hashtable.">gdsl_hash_modify()</a> function. Until this function is called, then all H's lists entries have no size limit. The function pointers ALLOC_F and FREE_F could be used to respectively, alloc and free elements in the hashtable. The KEY_F function must provide a unique key associated to its argument. The HASH_F function must compute a hash code from its argument. These pointers could be set to NULL to use the default ones:</p>
<ul>
<li>the default ALLOC_F simply returns its argument</li>
<li>the default FREE_F does nothing</li>
<li>the default KEY_F simply returns its argument</li>
<li>the default HASH_F is <a class="el" href="group__gdsl__hash.html#gafb96675c3097a359e962bca36a11a528" title="Computes a hash value from a NULL terminated character string.">gdsl_hash()</a> above</li>
</ul>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>nothing. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">NAME</td><td>The name of the new hashtable to create </td></tr>
    <tr><td class="paramname">ALLOC_F</td><td>Function to alloc element when inserting it in the hashtable </td></tr>
    <tr><td class="paramname">FREE_F</td><td>Function to free element when deleting it from the hashtable </td></tr>
    <tr><td class="paramname">KEY_F</td><td>Function to get the key from an element </td></tr>
    <tr><td class="paramname">HASH_F</td><td>Function used to compute the hash value. </td></tr>
    <tr><td class="paramname">INITIAL_ENTRIES_NB</td><td>Initial number of entries of the hashtable </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated hashtable in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga3723a6cfb3338b7e312d3e2f161f0692" title="Destroy a hashtable.">gdsl_hash_free()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gac047b5a4899747159dbaf44b39b7daeb" title="Flush a hashtable.">gdsl_hash_flush()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234" title="Increase the dimensions of a hashtable.">gdsl_hash_modify()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga3723a6cfb3338b7e312d3e2f161f0692"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_free" ref="ga3723a6cfb3338b7e312d3e2f161f0692" args="(gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__hash.html#ga3723a6cfb3338b7e312d3e2f161f0692">gdsl_hash_free</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy a hashtable. </p>
<p>Deallocate all the elements of the hashtable H by calling H's FREE_F function passed to <a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a>. The name of H is deallocated and H is deallocated itself too.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to destroy </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gac047b5a4899747159dbaf44b39b7daeb" title="Flush a hashtable.">gdsl_hash_flush()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac047b5a4899747159dbaf44b39b7daeb"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_flush" ref="gac047b5a4899747159dbaf44b39b7daeb" args="(gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__hash.html#gac047b5a4899747159dbaf44b39b7daeb">gdsl_hash_flush</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flush a hashtable. </p>
<p>Deallocate all the elements of the hashtable H by calling H's FREE_F function passed to <a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a>. H is not deallocated itself and H's name is not modified.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to flush </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga3723a6cfb3338b7e312d3e2f161f0692" title="Destroy a hashtable.">gdsl_hash_free()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga199e08c06af60e688d95244a023f406d"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_name" ref="ga199e08c06af60e688d95244a023f406d" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__gdsl__hash.html#ga199e08c06af60e688d95244a023f406d">gdsl_hash_get_name</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the name of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>The returned string MUST NOT be freed. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to get the name from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the hashtable H. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gac46d87b7312a26b985709a904a2f452e" title="Set the name of a hashtable.">gdsl_hash_set_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad87fd81a7853bdcfe2cc7fdd142556f0"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_entries_number" ref="gad87fd81a7853bdcfe2cc7fdd142556f0" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> <a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0">gdsl_hash_get_entries_number</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of entries of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of lists entries of the hashtable H. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d" title="Get the size of a hashtable.">gdsl_hash_get_size()</a> </dd>
<dd>
gdsl_hash_fill_factor() </dd></dl>

</div>
</div>
<a class="anchor" id="ga5d9b8da0f4ad5e60b7fdb38156ce48f3"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_lists_max_size" ref="ga5d9b8da0f4ad5e60b7fdb38156ce48f3" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> <a class="el" href="group__gdsl__hash.html#ga5d9b8da0f4ad5e60b7fdb38156ce48f3">gdsl_hash_get_lists_max_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the max number of elements allowed in each entry of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if no lists max size was set before (ie. no limit for H's entries). </dd>
<dd>
the max number of elements for each entry of the hashtable H, if the function <a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234" title="Increase the dimensions of a hashtable.">gdsl_hash_modify()</a> was used with a NEW_LISTS_MAX_SIZE greather than the actual one. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>gdsl_hash_fill_factor() </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682" title="Get the number of elements of the longest list entry of a hashtable.">gdsl_hash_get_longest_list_size()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234" title="Increase the dimensions of a hashtable.">gdsl_hash_modify()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad89e4fe4756aa34a0f47948819e53682"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_longest_list_size" ref="gad89e4fe4756aa34a0f47948819e53682" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a> <a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682">gdsl_hash_get_longest_list_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of elements of the longest list entry of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( L ), where L = gdsl_hash_get_entries_number(H) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of the longest list entry of the hashtable H. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d" title="Get the size of a hashtable.">gdsl_hash_get_size()</a> </dd>
<dd>
gdsl_hash_fill_factor() </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga5d9b8da0f4ad5e60b7fdb38156ce48f3" title="Get the max number of elements allowed in each entry of a hashtable.">gdsl_hash_get_lists_max_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga9f9bd328f3237d333a7d7bab5285aa2d"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_size" ref="ga9f9bd328f3237d333a7d7bab5285aa2d" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d">gdsl_hash_get_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the size of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( L ), where L = gdsl_hash_get_entries_number(H) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to get the size from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of H (noted |H|). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
gdsl_hash_fill_factor() </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682" title="Get the number of elements of the longest list entry of a hashtable.">gdsl_hash_get_longest_list_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga6c858e792ee64ce14bfeb0e7c03d3e42"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_get_fill_factor" ref="ga6c858e792ee64ce14bfeb0e7c03d3e42" args="(const gdsl_hash_t H)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="group__gdsl__hash.html#ga6c858e792ee64ce14bfeb0e7c03d3e42">gdsl_hash_get_fill_factor</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the fill factor of a hashtable. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( L ), where L = gdsl_hash_get_entries_number(H) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The fill factor of H, computed as |H| / L </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682" title="Get the number of elements of the longest list entry of a hashtable.">gdsl_hash_get_longest_list_size()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d" title="Get the size of a hashtable.">gdsl_hash_get_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac46d87b7312a26b985709a904a2f452e"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_set_name" ref="gac46d87b7312a26b985709a904a2f452e" args="(gdsl_hash_t H, const char *NEW_NAME)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> <a class="el" href="group__gdsl__hash.html#gac46d87b7312a26b985709a904a2f452e">gdsl_hash_set_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NEW_NAME</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the name of a hashtable. </p>
<p>Change the previous name of the hashtable H to a copy of NEW_NAME.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to change the name </td></tr>
    <tr><td class="paramname">NEW_NAME</td><td>The new name of H </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified hashtable in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga199e08c06af60e688d95244a023f406d" title="Get the name of a hashtable.">gdsl_hash_get_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga98ae1fcdb6908b699056e131357d837b"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_insert" ref="ga98ae1fcdb6908b699056e131357d837b" args="(gdsl_hash_t H, void *VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b">gdsl_hash_insert</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>VALUE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert an element into a hashtable (PUSH). </p>
<p>Allocate a new element E by calling H's ALLOC_F function on VALUE. The key K of the new element E is computed using KEY_F called on E. If the value of gdsl_hash_get_lists_max_size(H) is not reached, or if it is equal to zero, then the insertion is simple. Otherwise, H is re-organized as follow:</p>
<ul>
<li>its actual gdsl_hash_get_entries_number(H) (say N) is modified as N * 2 + 1</li>
<li>its actual gdsl_hash_get_lists_max_size(H) (say M) is modified as M * 2 The element E is then inserted into H at the entry computed by HASH_F( K ) modulo gdsl_hash_get_entries_number(H). ALLOC_F, KEY_F and HASH_F are the function pointers passed to <a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a>.</li>
</ul>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) if gdsl_hash_get_lists_max_size(H) is not reached or if it is equal to zero </dd>
<dd>
Complexity: O ( gdsl_hash_modify (H) ) if gdsl_hash_get_lists_max_size(H) is reached, so H needs to grow </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to modify </td></tr>
    <tr><td class="paramname">VALUE</td><td>The value used to make the new element to insert into H </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the inserted element E in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga2e7d31f45b959fe14badc3b620a8de5e" title="Remove an element from a hashtable (POP).">gdsl_hash_remove()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga94dfde405aae321e2c3d02d3c260bfcb" title="Delete an element from a hashtable.">gdsl_hash_delete()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga9f9bd328f3237d333a7d7bab5285aa2d" title="Get the size of a hashtable.">gdsl_hash_get_size()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234" title="Increase the dimensions of a hashtable.">gdsl_hash_modify()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2e7d31f45b959fe14badc3b620a8de5e"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_remove" ref="ga2e7d31f45b959fe14badc3b620a8de5e" args="(gdsl_hash_t H, const char *KEY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__hash.html#ga2e7d31f45b959fe14badc3b620a8de5e">gdsl_hash_remove</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>KEY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove an element from a hashtable (POP). </p>
<p>Search into the hashtable H for the first element E equal to KEY. If E is found, it is removed from H and then returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( M ), where M is the average size of H's lists </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to modify </td></tr>
    <tr><td class="paramname">KEY</td><td>The key used to find the element to remove </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first founded element equal to KEY in H in case is found. </dd>
<dd>
NULL in case no element equal to KEY is found in H. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gab8713e392d660458f514a8489c25c7c0" title="Search for a particular element into a hashtable (GET).">gdsl_hash_search()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga94dfde405aae321e2c3d02d3c260bfcb" title="Delete an element from a hashtable.">gdsl_hash_delete()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga94dfde405aae321e2c3d02d3c260bfcb"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_delete" ref="ga94dfde405aae321e2c3d02d3c260bfcb" args="(gdsl_hash_t H, const char *KEY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> <a class="el" href="group__gdsl__hash.html#ga94dfde405aae321e2c3d02d3c260bfcb">gdsl_hash_delete</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>KEY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete an element from a hashtable. </p>
<p>Remove from he hashtable H the first founded element E equal to KEY. If E is found, it is removed from H and E is deallocated using H's FREE_F function passed to <a class="el" href="group__gdsl__hash.html#gae19c5647d31f3d8f88b988e89609049c" title="Create a new hashtable.">gdsl_hash_alloc()</a>, then H is returned.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( M ), where M is the average size of H's lists </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to modify </td></tr>
    <tr><td class="paramname">KEY</td><td>The key used to find the element to remove </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified hashtable after removal of E if E was found. </dd>
<dd>
NULL if no element equal to KEY was found. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gab8713e392d660458f514a8489c25c7c0" title="Search for a particular element into a hashtable (GET).">gdsl_hash_search()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga2e7d31f45b959fe14badc3b620a8de5e" title="Remove an element from a hashtable (POP).">gdsl_hash_remove()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga56acbd8af54ef98000d1749afbb28234"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_modify" ref="ga56acbd8af54ef98000d1749afbb28234" args="(gdsl_hash_t H, ushort NEW_ENTRIES_NB, ushort NEW_LISTS_MAX_SIZE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a> <a class="el" href="group__gdsl__hash.html#ga56acbd8af54ef98000d1749afbb28234">gdsl_hash_modify</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td>
          <td class="paramname"><em>NEW_ENTRIES_NB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga3fa7784c89589b49764048e9909d0e07">ushort</a>&#160;</td>
          <td class="paramname"><em>NEW_LISTS_MAX_SIZE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Increase the dimensions of a hashtable. </p>
<p>The hashtable H is re-organized to have NEW_ENTRIES_NB lists entries. Each entry is limited to NEW_LISTS_MAX_SIZE elements. After a call to this function, all insertions into H will make H automatically growing if needed. The grow is needed each time an insertion makes an entry list to reach NEW_LISTS_MAX_SIZE elements. In this case, H will be reorganized automatically by <a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t &amp; NEW_ENTRIES_NB &gt; gdsl_hash_get_entries_number(H) &amp; NEW_LISTS_MAX_SIZE &gt; gdsl_hash_get_lists_max_size(H) </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to modify </td></tr>
    <tr><td class="paramname">NEW_ENTRIES_NB</td><td></td></tr>
    <tr><td class="paramname">NEW_LISTS_MAX_SIZE</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified hashtable H in case of success </dd>
<dd>
NULL in case of failure, or in case NEW_ENTRIES_NB &lt;= gdsl_hash_get_entries_number(H) or in case NEW_LISTS_MAX_SIZE &lt;= gdsl_hash_get_lists_max_size(H) in these cases, H is not modified </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad87fd81a7853bdcfe2cc7fdd142556f0" title="Get the number of entries of a hashtable.">gdsl_hash_get_entries_number()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga6c858e792ee64ce14bfeb0e7c03d3e42" title="Get the fill factor of a hashtable.">gdsl_hash_get_fill_factor()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#gad89e4fe4756aa34a0f47948819e53682" title="Get the number of elements of the longest list entry of a hashtable.">gdsl_hash_get_longest_list_size()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga5d9b8da0f4ad5e60b7fdb38156ce48f3" title="Get the max number of elements allowed in each entry of a hashtable.">gdsl_hash_get_lists_max_size()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab8713e392d660458f514a8489c25c7c0"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_search" ref="gab8713e392d660458f514a8489c25c7c0" args="(const gdsl_hash_t H, const char *KEY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__hash.html#gab8713e392d660458f514a8489c25c7c0">gdsl_hash_search</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>KEY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Search for a particular element into a hashtable (GET). </p>
<p>Search the first element E equal to KEY in the hashtable H.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( M ), where M is the average size of H's lists </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to search the element in </td></tr>
    <tr><td class="paramname">KEY</td><td>The key to compare H's elements with </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the founded element E if it was found. </dd>
<dd>
NULL in case the searched element E was not found. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga98ae1fcdb6908b699056e131357d837b" title="Insert an element into a hashtable (PUSH).">gdsl_hash_insert()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga2e7d31f45b959fe14badc3b620a8de5e" title="Remove an element from a hashtable (POP).">gdsl_hash_remove()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga94dfde405aae321e2c3d02d3c260bfcb" title="Delete an element from a hashtable.">gdsl_hash_delete()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gafde50a811a8f52eed47573385ddf2a20"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_map" ref="gafde50a811a8f52eed47573385ddf2a20" args="(const gdsl_hash_t H, gdsl_map_func_t MAP_F, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> <a class="el" href="group__gdsl__hash.html#gafde50a811a8f52eed47573385ddf2a20">gdsl_hash_map</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga2500bfaaec5df890e72b43f448f13ee8">gdsl_map_func_t</a>&#160;</td>
          <td class="paramname"><em>MAP_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a hashtable. </p>
<p>Parse all elements of the hashtable H. The MAP_F function is called on each H's element with USER_DATA argument. If MAP_F returns GDSL_MAP_STOP then <a class="el" href="group__gdsl__hash.html#gafde50a811a8f52eed47573385ddf2a20" title="Parse a hashtable.">gdsl_hash_map()</a> stops and returns its last examinated element.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t &amp; MAP_F != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to map </td></tr>
    <tr><td class="paramname">MAP_F</td><td>The map function. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to MAP_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first element for which MAP_F returns GDSL_MAP_STOP. </dd>
<dd>
NULL when the parsing is done. </dd></dl>

</div>
</div>
<a class="anchor" id="ga00a73b21261010787c00d33d086ad7b2"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_write" ref="ga00a73b21261010787c00d33d086ad7b2" args="(const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__hash.html#ga00a73b21261010787c00d33d086ad7b2">gdsl_hash_write</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write all the elements of a hashtable to a file. </p>
<p>Write the elements of the hashtable H to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t &amp; OUTPUT_FILE != NULL &amp; WRITE_F != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga9b7fa22eac1c348b8b21c0136f44dcc2" title="Write the content of a hashtable to a file into XML.">gdsl_hash_write_xml()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga22b2515584dca1ab91f391602f4f4eeb" title="Dump the internal structure of a hashtable to a file.">gdsl_hash_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga9b7fa22eac1c348b8b21c0136f44dcc2"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_write_xml" ref="ga9b7fa22eac1c348b8b21c0136f44dcc2" args="(const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__hash.html#ga9b7fa22eac1c348b8b21c0136f44dcc2">gdsl_hash_write_xml</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the content of a hashtable to a file into XML. </p>
<p>Write the elements of the hashtable H to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F to write H's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga00a73b21261010787c00d33d086ad7b2" title="Write all the elements of a hashtable to a file.">gdsl_hash_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga22b2515584dca1ab91f391602f4f4eeb" title="Dump the internal structure of a hashtable to a file.">gdsl_hash_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga22b2515584dca1ab91f391602f4f4eeb"></a><!-- doxytag: member="gdsl_hash.h::gdsl_hash_dump" ref="ga22b2515584dca1ab91f391602f4f4eeb" args="(const gdsl_hash_t H, gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__hash.html#ga22b2515584dca1ab91f391602f4f4eeb">gdsl_hash_dump</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__hash.html#gae145ec3ea3d118dcc593ab7902162cd2">gdsl_hash_t</a>&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump the internal structure of a hashtable to a file. </p>
<p>Dump the structure of the hashtable H to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F to write H's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |H| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>H must be a valid gdsl_hash_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">H</td><td>The hashtable to write </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write H's elements </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__hash.html#ga00a73b21261010787c00d33d086ad7b2" title="Write all the elements of a hashtable to a file.">gdsl_hash_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__hash.html#ga9b7fa22eac1c348b8b21c0136f44dcc2" title="Write the content of a hashtable to a file into XML.">gdsl_hash_write_xml()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
